<?php

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;


?>

<div class="cruise-form">

    <?php $form = ActiveForm::begin([
                                     'options' => ['enctype' => 'multipart/form-data',],
                                     'layout' => 'horizontal',
                                     'fieldConfig' => [
                                        'template' => "{label}\n{beginWrapper}\n{input}\n{hint}\n{error}\n{endWrapper}",
                                        'horizontalCssClasses' => [
                                            'label' => 'col-sm-2',
                                            'wrapper' => 'col-sm-7',
                                            'error' => '',
                                        ],
                                     ],
                                ]); ?>

    <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'en_name')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'code',['template'=>'{label}<div class="col-md-3">{input}{error}</div>'])->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'weight',['template'=>'{label}<div class="col-md-3">{input}{error}</div>{hint}'])->hint('吨')->textInput() ?>
    <?= $form->field($model, 'num',['template'=>'{label}<div class="col-md-3">{input}{error}</div>{hint}'])->hint('人')->textInput() ?>

    <?= $form->field($model, 'length',['template'=>'{label}<div class="col-md-3">{input}{error}</div>{hint}'])->hint('米')->textInput() ?>

    <?= $form->field($model, 'width',['template'=>'{label}<div class="col-md-3">{input}{error}</div>{hint}'])->hint('米')->textInput() ?>

    <?= $form->field($model, 'room',['template'=>'{label}<div class="col-md-3">{input}{error}</div>{hint}'])->hint('间')->textInput() ?>

   <?= $form->field($model, 'ceil',['template'=>'{label}<div class="col-md-3">{input}{error}</div>{hint}'])->hint('层')->textInput() ?>

    <?= $form->field($model, 'speed',['template'=>'{label}<div class="col-md-3">{input}{error}</div>{hint}'])->hint('节')->textInput() ?>

    <?= $form->field($model, 'first',['template'=>'{label}<div class="col-sm-4">{input}{hint}</div>{error}'])
                                        ->widget(kartik\date\DatePicker::classname(),[
                                                    'options' => ['placeholder' => '开业时间'],
                                                    'pluginOptions' => [
                                                        'format' => 'yyyy',
                                                        'minViewMode' => 2,
                                                        'startView' => 'decade',
                                                        'autoclose'=>true,
                                                        'todayHighlight' => true
                                                    ]
                                                ]); ?>


    <?= $form->field($model, 'desc')->textArea(['maxlength' => true]) ?>

    <?= $form->field($model, 'status')->inline(true)->radioList(\Yii::$app->params['status']) ?>

    <div class="form-group text-center">
        <?= Html::submitButton('保存', ['class' => 'btn btn-success']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
